﻿using EyFramework.Sys.Core.Dao;
using EyFramework.Sys.Entity;
using System;
using System.Collections.Generic;
using System.Linq;

namespace EyFramework.Sys.Core.Service
{
    public class SysListService : BaseHisService, ISysListService
    {
        protected ISysListDao _sysListDao;

        public SysListService(ISysListDao sysListDao)
        {
            _sysListDao = sysListDao;
        }

        public List<SysList> GetAllActiveSys()
        {
            return _sysListDao.GetList().Where(p => p.SYS_TYPE == "2").OrderBy(p => p.ORD_NUM).ToList();
        }

        public SysList GetSysListById(string sysid)
        {
            return _sysListDao.GetById(sysid);
        }
    }
}